<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateApppageAreasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apppage_areas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('application_id')->default(0)->nullable()->unsigned()->comment('应用ID');
            $table->integer('apppage_id')->default(0)->unsigned()->comment('应用页面ID');
            $table->integer('pagetpl_id')->default(0)->unsigned()->comment('page模板ID');
            $table->string('area', 100)->comment('区位编号');
            $table->integer('panteltpl_type_id')->default(0)->nullable()->unsigned()->comment('模板类型ID');
            $table->integer('tpl_id')->default(0)->nullable()->unsigned()->comment('模板名称');
            $table->string('inner')->nullable()->comment('inner');
            $table->string('onup')->nullable()->comment('onup');
            $table->string('ondown')->nullable()->comment('ondown');
            $table->string('onleft')->nullable()->comment('onleft');
            $table->string('onright')->nullable()->comment('onright');
            $table->string('options')->nullable()->comment('options');
            $table->string('description')->nullable()->comment('说明');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apppage_areas');
    }
}
